package com.ruoyi.member.api.factory;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.member.api.RemoteSellerMyOrderService;
import com.ruoyi.member.api.domain.BmInorderlist;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 仓库服务降级处理
 *
 * @author ruoyi
 */
@Component
public class RemoteSellerMyOrderFallbackFactory implements FallbackFactory<RemoteSellerMyOrderService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteSellerMyOrderFallbackFactory.class);

    @Override
    public RemoteSellerMyOrderService create(Throwable cause) {
        log.error("仓库服务调用失败:{}", cause.getMessage());
        return new RemoteSellerMyOrderService() {
            @Override
            public boolean one(BmInorderlist bmInorderlist) {
                return false;
            }
        };
    }
}
